home *** CD-ROM | disk | FTP | other *** search
- Path: ix.netcom.com!netnews
- From: brenth@ix.netcom.com(harold brent hyatt)
- Newsgroups: comp.lang.c
- Subject: prototype error
- Date: 14 Mar 1996 04:10:48 GMT
- Organization: Netcom
- Message-ID: <4i8688$1gr@cloner4.netcom.com>
- NNTP-Posting-Host: sma-ca1-12.ix.netcom.com
- X-NETCOM-Date: Wed Mar 13 8:10:48 PM PST 1996
-
- I copied this program from a C primer and get an error as follows:
- "Call to function sound, delay, nosound with no prototype."
- I'm using a Borland 3.1 C++ compiler in the EasyWin mode. I have
- tried switching the compiler from ANSI to Borland C++, but with the
- same result. What's wrong? Thanks.
-
- #include <stdio.h>
- #include<conio.h>
- #include<dos.h>
-
- void dropBomb (void);
-
- main()
- {
- printf("Press any key to drop bomb:\n");
- getch();
- dropBomb();
- printf("\nYikes!\n");
- }
- void dropBomb()
- {
- int x;
-
- for(x=880;x>440;x-=10)
- {
- sound(x);
- delay(100);
- }
- nosound();
- }
-